#include <assert.h>
#include "giscoreao_factory.h"
#include "giscoreao_stub4web.h"
#include "giscoreao_stub4app.h"
//#include "giscoreao.h"

using namespace erp::gis::ao;

bool CGisCoreAoFactory::s_GisCoreAoInit = false;

IGisCoreAo* CGisCoreAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CGisCoreAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_GisCoreAoInit)
        {
            int iRetCode = CGisCoreAo::Initialize();
            assert(iRetCode == 0);
            s_GisCoreAoInit = true;
        }   	
        return (new CGisCoreAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IGisCoreAoAsyc* CGisCoreAoFactory::GetAsycObject()
{
	return (new CGisCoreAoStub4App);
}
